<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>OrbbecSDK: ob::Context Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="orbbec_icon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OrbbecSDK
   &#160;<span id="projectnumber">1.10.22</span>
   </div>
   <div id="projectbrief">OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceob.html">ob</a></li><li class="navelem"><a class="el" href="classob_1_1Context.html">Context</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classob_1_1Context-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ob::Context Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="Context_8hpp_source.html">Context.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a86116757cdd1d415d2687a7c9e505372"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a86116757cdd1d415d2687a7c9e505372">DeviceChangedCallback</a> = std::function&lt; void(std::shared_ptr&lt; <a class="el" href="classob_1_1DeviceList.html">DeviceList</a> &gt; removedList, std::shared_ptr&lt; <a class="el" href="classob_1_1DeviceList.html">DeviceList</a> &gt; addedList)&gt;</td></tr>
<tr class="separator:a86116757cdd1d415d2687a7c9e505372"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad80df0d99a8a939d58a476e00f7432f"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#aad80df0d99a8a939d58a476e00f7432f">LogCallback</a> = std::function&lt; void(<a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a> severity, const char *logMsg)&gt;</td></tr>
<tr class="memdesc:aad80df0d99a8a939d58a476e00f7432f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log output callback function.  <a href="#aad80df0d99a8a939d58a476e00f7432f">More...</a><br /></td></tr>
<tr class="separator:aad80df0d99a8a939d58a476e00f7432f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:add1d4b543d4765207462b1af057244a9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#add1d4b543d4765207462b1af057244a9">Context</a> (const char *configPath=&quot;&quot;)</td></tr>
<tr class="memdesc:add1d4b543d4765207462b1af057244a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="classob_1_1Context.html">Context</a> class is a management class that describes the runtime of the SDK. It is responsible for applying and releasing resources for the SDK. The context has the ability to manage multiple devices, enumerate devices, monitor device callbacks, and enable functions such as multi-device synchronization.  <a href="#add1d4b543d4765207462b1af057244a9">More...</a><br /></td></tr>
<tr class="separator:add1d4b543d4765207462b1af057244a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ca8598da9d7cb72a5e3b2661b9c637b"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a3ca8598da9d7cb72a5e3b2661b9c637b">~Context</a> () noexcept</td></tr>
<tr class="separator:a3ca8598da9d7cb72a5e3b2661b9c637b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1dbaaaa2f6a4e53fb039e485d18267b"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="classob_1_1DeviceList.html">DeviceList</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#ac1dbaaaa2f6a4e53fb039e485d18267b">queryDeviceList</a> ()</td></tr>
<tr class="memdesc:ac1dbaaaa2f6a4e53fb039e485d18267b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Queries the enumerated device list.  <a href="#ac1dbaaaa2f6a4e53fb039e485d18267b">More...</a><br /></td></tr>
<tr class="separator:ac1dbaaaa2f6a4e53fb039e485d18267b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4164180385e809c8fd5b2c3defc5711"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#ac4164180385e809c8fd5b2c3defc5711">enableNetDeviceEnumeration</a> (bool enable)</td></tr>
<tr class="memdesc:ac4164180385e809c8fd5b2c3defc5711"><td class="mdescLeft">&#160;</td><td class="mdescRight">enable or disable net device enumeration.  <a href="#ac4164180385e809c8fd5b2c3defc5711">More...</a><br /></td></tr>
<tr class="separator:ac4164180385e809c8fd5b2c3defc5711"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00a8a9036b00cba9d1f4f6712c3ebb3d"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="classob_1_1Device.html">Device</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a00a8a9036b00cba9d1f4f6712c3ebb3d">createNetDevice</a> (const char *address, uint16_t port)</td></tr>
<tr class="memdesc:a00a8a9036b00cba9d1f4f6712c3ebb3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a network device object.  <a href="#a00a8a9036b00cba9d1f4f6712c3ebb3d">More...</a><br /></td></tr>
<tr class="separator:a00a8a9036b00cba9d1f4f6712c3ebb3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4091c5bcd5b1300e6d4f2eb54b6352f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a4091c5bcd5b1300e6d4f2eb54b6352f4">changeNetDeviceIpConfig</a> (const char *deviceUid, const <a class="el" href="structOBNetIpConfig.html">OBNetIpConfig</a> &amp;config)</td></tr>
<tr class="memdesc:a4091c5bcd5b1300e6d4f2eb54b6352f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the IP configuration of a network device.  <a href="#a4091c5bcd5b1300e6d4f2eb54b6352f4">More...</a><br /></td></tr>
<tr class="separator:a4091c5bcd5b1300e6d4f2eb54b6352f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dcc95b63547ba0ec763206a81ef8f40"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a1dcc95b63547ba0ec763206a81ef8f40">setDeviceChangedCallback</a> (<a class="el" href="classob_1_1Context.html#a86116757cdd1d415d2687a7c9e505372">DeviceChangedCallback</a> callback)</td></tr>
<tr class="memdesc:a1dcc95b63547ba0ec763206a81ef8f40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the device plug-in callback function.  <a href="#a1dcc95b63547ba0ec763206a81ef8f40">More...</a><br /></td></tr>
<tr class="separator:a1dcc95b63547ba0ec763206a81ef8f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c428a487db0b5e34ddd5e4b9a35b48b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a9c428a487db0b5e34ddd5e4b9a35b48b">enableDeviceClockSync</a> (uint64_t repeatInterval)</td></tr>
<tr class="memdesc:a9c428a487db0b5e34ddd5e4b9a35b48b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Activates device clock synchronization to synchronize the clock of the host and all created devices (if supported).  <a href="#a9c428a487db0b5e34ddd5e4b9a35b48b">More...</a><br /></td></tr>
<tr class="separator:a9c428a487db0b5e34ddd5e4b9a35b48b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafe9d3abd6873ae6ab7c82cf3a0c597b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#aafe9d3abd6873ae6ab7c82cf3a0c597b">freeIdleMemory</a> ()</td></tr>
<tr class="memdesc:aafe9d3abd6873ae6ab7c82cf3a0c597b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees idle memory from the internal frame memory pool.  <a href="#aafe9d3abd6873ae6ab7c82cf3a0c597b">More...</a><br /></td></tr>
<tr class="separator:aafe9d3abd6873ae6ab7c82cf3a0c597b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd292008960032d8fd76439fcb1d932f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#abd292008960032d8fd76439fcb1d932f">setUVCBackend</a> (<a class="el" href="ObTypes_8h.html#a7ad5dd46ebbd7e29106555f064ee1f1f">OBUvcBackend</a> uvcBackend)</td></tr>
<tr class="memdesc:abd292008960032d8fd76439fcb1d932f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the UVC backend for the specified context This function configures the Universal Video Class (UVC) backend for the given context, allowing the selection of a specific backend for video capture operations.  <a href="#abd292008960032d8fd76439fcb1d932f">More...</a><br /></td></tr>
<tr class="separator:abd292008960032d8fd76439fcb1d932f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a158039a9dd86f0f7e8a60e14677d6856"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a158039a9dd86f0f7e8a60e14677d6856">setLoggerSeverity</a> (<a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a> severity)</td></tr>
<tr class="memdesc:a158039a9dd86f0f7e8a60e14677d6856"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the level of the global log, which affects both the log level output to the terminal and output to the file.  <a href="#a158039a9dd86f0f7e8a60e14677d6856">More...</a><br /></td></tr>
<tr class="separator:a158039a9dd86f0f7e8a60e14677d6856"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afec33d3a8226ff701dee7c777cea9713"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#afec33d3a8226ff701dee7c777cea9713">setLoggerToFile</a> (<a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a> severity, const char *directory)</td></tr>
<tr class="memdesc:afec33d3a8226ff701dee7c777cea9713"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set log output to a file.  <a href="#afec33d3a8226ff701dee7c777cea9713">More...</a><br /></td></tr>
<tr class="separator:afec33d3a8226ff701dee7c777cea9713"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1da0bea9057747067ea6776680b45de6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a1da0bea9057747067ea6776680b45de6">setLoggerToConsole</a> (<a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a> severity)</td></tr>
<tr class="memdesc:a1da0bea9057747067ea6776680b45de6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set log output to the terminal.  <a href="#a1da0bea9057747067ea6776680b45de6">More...</a><br /></td></tr>
<tr class="separator:a1da0bea9057747067ea6776680b45de6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70e6ed3b860ac6bdd4ef25c048f18f99"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a70e6ed3b860ac6bdd4ef25c048f18f99">setLoggerToCallback</a> (<a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a> severity, <a class="el" href="classob_1_1Context.html#aad80df0d99a8a939d58a476e00f7432f">LogCallback</a> callback)</td></tr>
<tr class="memdesc:a70e6ed3b860ac6bdd4ef25c048f18f99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the logger to callback.  <a href="#a70e6ed3b860ac6bdd4ef25c048f18f99">More...</a><br /></td></tr>
<tr class="separator:a70e6ed3b860ac6bdd4ef25c048f18f99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4881f168178c2d2d28934fc5be901e56"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#a4881f168178c2d2d28934fc5be901e56">loadLicense</a> (const char *filePath, const char *key=<a class="el" href="ObTypes_8h.html#a5eeadb4cea31961aab689e5d7a225e9c">OB_DEFAULT_DECRYPT_KEY</a>)</td></tr>
<tr class="memdesc:a4881f168178c2d2d28934fc5be901e56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads a license file.  <a href="#a4881f168178c2d2d28934fc5be901e56">More...</a><br /></td></tr>
<tr class="separator:a4881f168178c2d2d28934fc5be901e56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af77259be549896524493d14d32a4e204"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classob_1_1Context.html#af77259be549896524493d14d32a4e204">loadLicenseFromData</a> (const char *data, uint32_t dataLen, const char *key=<a class="el" href="ObTypes_8h.html#a5eeadb4cea31961aab689e5d7a225e9c">OB_DEFAULT_DECRYPT_KEY</a>)</td></tr>
<tr class="memdesc:af77259be549896524493d14d32a4e204"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads a license from data.  <a href="#af77259be549896524493d14d32a4e204">More...</a><br /></td></tr>
<tr class="separator:af77259be549896524493d14d32a4e204"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="Context_8hpp_source.html#l00021">21</a> of file <a class="el" href="Context_8hpp_source.html">Context.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a86116757cdd1d415d2687a7c9e505372"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classob_1_1Context.html#a86116757cdd1d415d2687a7c9e505372">ob::Context::DeviceChangedCallback</a> =  std::function&lt;void(std::shared_ptr&lt;<a class="el" href="classob_1_1DeviceList.html">DeviceList</a>&gt; removedList, std::shared_ptr&lt;<a class="el" href="classob_1_1DeviceList.html">DeviceList</a>&gt; addedList)&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="Context_8hpp_source.html#l00069">69</a> of file <a class="el" href="Context_8hpp_source.html">Context.hpp</a>.</p>

</div>
</div>
<a class="anchor" id="aad80df0d99a8a939d58a476e00f7432f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classob_1_1Context.html#aad80df0d99a8a939d58a476e00f7432f">ob::Context::LogCallback</a> =  std::function&lt;void(<a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a> severity, const char *logMsg)&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Log output callback function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">severity</td><td>The current callback log level. </td></tr>
    <tr><td class="paramname">logMsg</td><td>The log message. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="Context_8hpp_source.html#l00120">120</a> of file <a class="el" href="Context_8hpp_source.html">Context.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="add1d4b543d4765207462b1af057244a9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ob::Context::Context </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>configPath</em> = <code>&quot;&quot;</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The <a class="el" href="classob_1_1Context.html">Context</a> class is a management class that describes the runtime of the SDK. It is responsible for applying and releasing resources for the SDK. The context has the ability to manage multiple devices, enumerate devices, monitor device callbacks, and enable functions such as multi-device synchronization. </p>

</div>
</div>
<a class="anchor" id="a3ca8598da9d7cb72a5e3b2661b9c637b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual ob::Context::~Context </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac1dbaaaa2f6a4e53fb039e485d18267b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="classob_1_1DeviceList.html">DeviceList</a>&gt; ob::Context::queryDeviceList </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Queries the enumerated device list. </p>
<dl class="section return"><dt>Returns</dt><dd>std::shared_ptr&lt;DeviceList&gt; A pointer to the device list class. </dd></dl>

</div>
</div>
<a class="anchor" id="ac4164180385e809c8fd5b2c3defc5711"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob::Context::enableNetDeviceEnumeration </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>enable or disable net device enumeration. </p>
<p>after enable, the net device will be discovered automatically and can be retrieved by <a class="el" href="classob_1_1Context.html#ac1dbaaaa2f6a4e53fb039e485d18267b">queryDeviceList</a>. The default state can be set in the configuration file.</p>
<dl class="section attention"><dt>Attention</dt><dd>Net device enumeration by gvcp protocol, if the device is not in the same subnet as the host, it will be discovered but cannot be connected.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">enable</td><td>true to enable, false to disable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a00a8a9036b00cba9d1f4f6712c3ebb3d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="classob_1_1Device.html">Device</a>&gt; ob::Context::createNetDevice </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a network device object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>The IP address. </td></tr>
    <tr><td class="paramname">port</td><td>The port. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::shared_ptr&lt;Device&gt; The created device object. </dd></dl>

</div>
</div>
<a class="anchor" id="a4091c5bcd5b1300e6d4f2eb54b6352f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob::Context::changeNetDeviceIpConfig </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>deviceUid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structOBNetIpConfig.html">OBNetIpConfig</a> &amp;&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Changes the IP configuration of a network device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deviceUid</td><td>The device unique ID, which is the network device MAC address. It can be obtained through the <a class="el" href="classob_1_1DeviceList.html#ac0c1f95a7750bd639d9412c59225c6b9">DeviceList::uid()</a> function. </td></tr>
    <tr><td class="paramname">config</td><td>The new IP configuration. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1dcc95b63547ba0ec763206a81ef8f40"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob::Context::setDeviceChangedCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classob_1_1Context.html#a86116757cdd1d415d2687a7c9e505372">DeviceChangedCallback</a>&#160;</td>
          <td class="paramname"><em>callback</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the device plug-in callback function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">callback</td><td>The function triggered when the device is plugged and unplugged. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9c428a487db0b5e34ddd5e4b9a35b48b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob::Context::enableDeviceClockSync </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>repeatInterval</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Activates device clock synchronization to synchronize the clock of the host and all created devices (if supported). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">repeatInterval</td><td>The interval for auto-repeated synchronization, in milliseconds. If the value is 0, synchronization is performed only once. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aafe9d3abd6873ae6ab7c82cf3a0c597b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob::Context::freeIdleMemory </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Frees idle memory from the internal frame memory pool. </p>

</div>
</div>
<a class="anchor" id="a158039a9dd86f0f7e8a60e14677d6856"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ob::Context::setLoggerSeverity </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a>&#160;</td>
          <td class="paramname"><em>severity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the level of the global log, which affects both the log level output to the terminal and output to the file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">severity</td><td>The log output level. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afec33d3a8226ff701dee7c777cea9713"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ob::Context::setLoggerToFile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a>&#160;</td>
          <td class="paramname"><em>severity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>directory</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set log output to a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">severity</td><td>The log level output to the file. </td></tr>
    <tr><td class="paramname">directory</td><td>The log file output path. If the path is empty, the existing settings will continue to be used (if the existing configuration is also empty, the log will not be output to the file). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1da0bea9057747067ea6776680b45de6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ob::Context::setLoggerToConsole </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a>&#160;</td>
          <td class="paramname"><em>severity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set log output to the terminal. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">severity</td><td>The log level output to the terminal. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a70e6ed3b860ac6bdd4ef25c048f18f99"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ob::Context::setLoggerToCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#af3552b30cb452c3065783e55bf0a6f42">OBLogSeverity</a>&#160;</td>
          <td class="paramname"><em>severity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classob_1_1Context.html#aad80df0d99a8a939d58a476e00f7432f">LogCallback</a>&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the logger to callback. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">severity</td><td>The callback log level. </td></tr>
    <tr><td class="paramname">callback</td><td>The callback function. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4881f168178c2d2d28934fc5be901e56"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ob::Context::loadLicense </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filePath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em> = <code><a class="el" href="ObTypes_8h.html#a5eeadb4cea31961aab689e5d7a225e9c">OB_DEFAULT_DECRYPT_KEY</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Loads a license file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filePath</td><td>The license file path. </td></tr>
    <tr><td class="paramname">key</td><td>The decryption key. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af77259be549896524493d14d32a4e204"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ob::Context::loadLicenseFromData </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>dataLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em> = <code><a class="el" href="ObTypes_8h.html#a5eeadb4cea31961aab689e5d7a225e9c">OB_DEFAULT_DECRYPT_KEY</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Loads a license from data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>The license data. </td></tr>
    <tr><td class="paramname">dataLen</td><td>The license data length. </td></tr>
    <tr><td class="paramname">key</td><td>The decryption key. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abd292008960032d8fd76439fcb1d932f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ob::Context::setUVCBackend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ObTypes_8h.html#a7ad5dd46ebbd7e29106555f064ee1f1f">OBUvcBackend</a>&#160;</td>
          <td class="paramname"><em>uvcBackend</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the UVC backend for the specified context This function configures the Universal Video Class (UVC) backend for the given context, allowing the selection of a specific backend for video capture operations. </p>
<dl class="section attention"><dt>Attention</dt><dd>This function is only supported on Linux (ARM) platforms. Some devices, like the Dabai series, do not support V4L2. Therefore, the default backend is LIBUVC. Ensure that the device supports V4L2 before setting it as the backend.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">uvcBackend</td><td>Specifies the UVC backend to use:<ul>
<li><code>UVC_BACKEND_AUTO</code>: Automatically selects between V4L2 or libuvc based on metadata support.</li>
<li><code>UVC_BACKEND_LIBUVC</code>: Forces the use of libuvc.</li>
<li><code>UVC_BACKEND_V4L2</code>: Forces the use of V4L2. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/root/libobsensor/include/libobsensor/hpp/<a class="el" href="Context_8hpp_source.html">Context.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Apr 10 2025 12:28:22 for OrbbecSDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
